package com.syf.kit.core.dao.mapper;

import cn.hutool.core.util.StrUtil;

public enum MapperType {
    MYBATIS_PLUS("MP"),
    TK_MAPPER("TK");

    private String name;

    MapperType(String name) {
        this.name = name;
    }

    public static MapperType getInstanceByName(String name) {
        for (MapperType mt : MapperType.values()) {
            if (StrUtil.equals(mt.getName(), name)) {
                return mt;
            }
        }

        return MYBATIS_PLUS;
    }

    public String getName() {
        return name;
    }
}
